class Solution {
public:
    int add(int a, int b) {
        int sum = a;  // 进不去循环直接返回 a
        int carry = 0;
        while(b != 0){   // 进位数为0
            sum = a ^ b;   // 无进位加法
            carry = (size_t)(a & b) << 1;  // 进位
            a = sum;
            b = carry;
        }
        return sum;
    }
};